package cn.itrip.dao.service;

import cn.itrip.beans.pojo.ItripLabelDic;
import cn.itrip.beans.vo.ItripLabelDicVO;
import cn.itrip.dao.mapper.ItripLabelDicMapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * @author Tequila
 **/
@Service
public class ItripLabelServiceImpl implements ItripLabelService {

    @Autowired
    private ItripLabelDicMapper itripLabelDicMapper;

    @Override
    public List<ItripLabelDic> queryHotelFeature(Map<String, Object> map) throws Exception {
        // 创建查询条件
        QueryWrapper<ItripLabelDic> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("parentId",map.get("parentId"));
        return itripLabelDicMapper.selectList(queryWrapper);
    }

    @Override
    public List<ItripLabelDicVO> queryHotelDetails(Integer hotelId) {
        return itripLabelDicMapper.queryHotelDetails(hotelId);
    }
}
